;--------------------------------------------------------
; File Created by SN-SDCC : SinoMCU ANSI-C Compiler
; Version 2.0.0 (Dec 11 2019) (MINGW32)
; This file was generated Fri Aug 22 19:59:15 2025
;--------------------------------------------------------
; MC30 port for the RISC core
;--------------------------------------------------------
;	.file	"lib.c"
	list	p=6060
	radix dec
	include "6060.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	extern	__gptrput1

	extern STK06
	extern STK05
	extern STK04
	extern STK03
	extern STK02
	extern STK01
	extern STK00
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	global	_clear_ram

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_lib_0	udata
r0x1002	res	1
r0x1001	res	1
r0x1000	res	1
r0x1003	res	1
r0x1004	res	1
r0x1005	res	1
r0x1006	res	1
r0x1007	res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------

;@Allocation info for local variables in function 'clear_ram'
;@clear_ram clear_ram                 Allocated to registers ;size:2
;@clear_ram lenght                    Allocated to registers r0x1003 ;size:1
;@clear_ram rfDataBuf                 Allocated to registers r0x1002 r0x1001 r0x1000 ;size:3
;@clear_ram i                         Allocated to registers r0x1004 ;size:1
;@end Allocation info for local variables in function 'clear_ram';

;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	udata_ovr
;--------------------------------------------------------
; code
;--------------------------------------------------------
code_lib	code
;***
;  pBlock Stats: dbName = C
;***
;entry:  _clear_ram	;Function start
; 2 exit points
;has an exit
;functions called:
;   __gptrput1
;   __gptrput1
;11 compiler assigned registers:
;   r0x1000
;   STK00
;   r0x1001
;   STK01
;   r0x1002
;   STK02
;   r0x1003
;   r0x1004
;   r0x1005
;   r0x1006
;   r0x1007
;; Starting pCode block
_clear_ram	;Function start
; 2 exit points
;	.line	1; "lib.c"	void clear_ram( unsigned char *rfDataBuf,unsigned char lenght) { 
	MOVRA	r0x1000
	MOVAR	STK00
	MOVRA	r0x1001
	MOVAR	STK01
	MOVRA	r0x1002
	MOVAR	STK02
	MOVRA	r0x1003
;	.line	3; "lib.c"	for(i=0;i<lenght;i++) { 
	CLRR	r0x1004
_00107_DS_
	MOVAR	r0x1003
	RSUBAR	r0x1004
	JBCLR	STATUS,0
	GOTO	_00109_DS_
;;genSkipc:3291: created from rifx:013B5EFC
;	.line	4; "lib.c"	*(rfDataBuf+i)=0x00;        
	MOVAR	r0x1004
	ADDAR	r0x1002
	MOVRA	r0x1005
	MOVAR	r0x1001
	JBCLR	STATUS,0
	ADDAI	0x01
	MOVRA	r0x1006
	MOVAR	r0x1000
	JBCLR	STATUS,0
	ADDAI	0x01
	MOVRA	r0x1007
	MOVAI	0x00
	MOVRA	STK02
	MOVAR	r0x1005
	MOVRA	STK01
	MOVAR	r0x1006
	MOVRA	STK00
	MOVAR	r0x1007
	CALL	__gptrput1
;	.line	3; "lib.c"	for(i=0;i<lenght;i++) { 
	INCR	r0x1004
	GOTO	_00107_DS_
_00109_DS_
;	.line	6; "lib.c"	}
	RETURN	
; exit point of _clear_ram


;	code size estimation:
;	   34+    0 =    34 instructions (   68 byte)

	end
